package com.johnny.data;

import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class TableInfo extends Info {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1800768471781094308L;

	private String tableId;
	private String banker;
	private List<String> bankerCandidateList;
	private String player1;
	private String player2;
	private String player3;
	private String player4;
	private String player5;
	private String player6;
	private TableState tableState;
	private int timer;
	private List<Long> door1Wagers;
	private List<String> door1Players;
	private List<Long> door2Wagers;
	private List<String> door2Players;
	private List<Long> door3Wagers;
	private List<String> door3Players;
	private boolean isCloseTable;
	private int[] diceNumbers;
	private int remainingCardCount;
	private Game28MathInfo mathInfo;
	private List<Integer> cards;

	public String getTableId() {
		return tableId;
	}

	public void setTableId(String tableId) {
		this.tableId = tableId;
	}

	public String getBanker() {
		return banker;
	}

	public void setBanker(String banker) {
		this.banker = banker;
	}

	public List<String> getBankerCandidateList() {
		return bankerCandidateList;
	}

	public void setBankerCandidateList(List<String> bankerCandidateList) {
		this.bankerCandidateList = bankerCandidateList;
	}

	public String getPlayer1() {
		return player1;
	}

	public void setPlayer1(String player1) {
		this.player1 = player1;
	}

	public String getPlayer2() {
		return player2;
	}

	public void setPlayer2(String player2) {
		this.player2 = player2;
	}

	public String getPlayer3() {
		return player3;
	}

	public void setPlayer3(String player3) {
		this.player3 = player3;
	}

	public String getPlayer4() {
		return player4;
	}

	public void setPlayer4(String player4) {
		this.player4 = player4;
	}

	public String getPlayer5() {
		return player5;
	}

	public void setPlayer5(String player5) {
		this.player5 = player5;
	}

	public String getPlayer6() {
		return player6;
	}

	public void setPlayer6(String player6) {
		this.player6 = player6;
	}

	public TableState getTableState() {
		return tableState;
	}

	public void setTableState(TableState tableState) {
		this.tableState = tableState;
	}

	public int getTimer() {
		return timer;
	}

	public void setTimer(int timer) {
		this.timer = timer;
	}

	public List<Long> getDoor1Wagers() {
		return door1Wagers;
	}

	public void setDoor1Wagers(List<Long> door1Wagers) {
		this.door1Wagers = door1Wagers;
	}

	public List<String> getDoor1Players() {
		return door1Players;
	}

	public void setDoor1Players(List<String> door1Players) {
		this.door1Players = door1Players;
	}

	public List<Long> getDoor2Wagers() {
		return door2Wagers;
	}

	public void setDoor2Wagers(List<Long> door2Wagers) {
		this.door2Wagers = door2Wagers;
	}

	public List<String> getDoor2Players() {
		return door2Players;
	}

	public void setDoor2Players(List<String> door2Players) {
		this.door2Players = door2Players;
	}

	public List<Long> getDoor3Wagers() {
		return door3Wagers;
	}

	public void setDoor3Wagers(List<Long> door3Wagers) {
		this.door3Wagers = door3Wagers;
	}

	public List<String> getDoor3Players() {
		return door3Players;
	}

	public void setDoor3Players(List<String> door3Players) {
		this.door3Players = door3Players;
	}

	public boolean isCloseTable() {
		return isCloseTable;
	}

	public void setCloseTable(boolean isCloseTable) {
		this.isCloseTable = isCloseTable;
	}

	public int[] getDiceNumbers() {
		return diceNumbers;
	}

	public void setDiceNumbers(int[] diceNumbers) {
		this.diceNumbers = diceNumbers;
	}

	public int getRemainingCardCount() {
		return remainingCardCount;
	}

	public void setRemainingCardCount(int remainingCardCount) {
		this.remainingCardCount = remainingCardCount;
	}

	public Game28MathInfo getMathInfo() {
		return mathInfo;
	}

	public void setMathInfo(Game28MathInfo mathInfo) {
		this.mathInfo = mathInfo;
	}

	public List<Integer> getCards() {
		return cards;
	}

	public void setCards(List<Integer> cards) {
		this.cards = cards;
	}

	@Override
	public JSONObject toJsonObject() {
		JSONObject object = new JSONObject();
		object.put("tableId", tableId);
		object.put("banker", banker);
		object.put("bankerCandidateList", bankerCandidateList);
		object.put("player1", player1);
		object.put("player2", player2);
		object.put("player3", player3);
		object.put("player4", player4);
		object.put("player5", player5);
		object.put("player6", player6);
		object.put("tableState", tableState);
		object.put("timer", timer);
		object.put("door1Wagers", door1Wagers);
		object.put("door1Players", door1Players);
		object.put("door2Wagers", door2Wagers);
		object.put("door2Players", door2Players);
		object.put("door3Wagers", door3Wagers);
		object.put("door3Players", door3Players);
		object.put("isCloseTable", isCloseTable);
		object.put("diceNumbers", JSONArray.fromObject(diceNumbers));
		object.put("remainingCardCount", remainingCardCount);
		object.put("mathInfo", mathInfo.toJsonObject());
		object.put("cards", JSONArray.fromObject(cards));
		return object;
	}

}
